<!--
  ~ Electronic Logistics Management Information System (eLMIS) is a supply chain management system for health commodities in a developing country setting.
  ~
  ~ Copyright (C) 2015  John Snow, Inc (JSI). This program was produced for the U.S. Agency for International Development (USAID). It was prepared under the USAID | DELIVER PROJECT, Task Order 4.
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<div>
    <h2 openlmis-message="link.admin.upload"></h2>

    <form id="uploadForm" name="uploadForm" action="/uploadDocument" method="POST" enctype="multipart/form-data" novalidate>
        <div>
            <fieldset>
                <label for="documentType"><span openlmis-message="upload.label.type"></span>:</label>

                <select name="documentType" id="documentType" ng-model="documentType"
                        >
                    <option  value="" openlmis-message="label.drop.down.select"></option>
                    <option >Image</option>
                    <option >Video</option>
                    <option >Document</option>
                </select>
                <span class="field-error" ng-show="uploadForm.documentType.errorMessage"
                      ng-bind="uploadForm.model.errorMessage"></span>
                <br/>
                <br/>
                <label for="helpDocuments"><span openlmis-message="upload.label.file"></span>:</label>
                <input name="helpDocuments" id="helpDocuments" ng-model="helpDocuments" type="file" accept=".java"
                       value="Choose Help Document to Upload" required/>
                <span class="field-error" ng-show="uploadForm.csvFile.errorMessage"
                      ng-bind="uploadForm.csvFile.errorMessage"></span>
                <br/>
                <br>


                <div class="alert alert-success" id="saveSuccessMsgDiv" ng-show="successMsg">
                    {{successMsg}}
                </div>
                <br>

            </fieldset>
            <div form-toolbar id="action_buttons" class="action-buttons">
            <div class="form-cell button-row">
                <input  ng-disabled="inProgress" type="submit" class="btn btn-primary save-button" openlmis-message="link.admin.upload"/>
                <a ng-click="cancelUpload()" class="btn btn-cancel cancel-button"><span
                        openlmis-message="button.cancel"></span></a>
            </div>
                <div class="alert alert-error" id="saveErrorMsgDiv" ng-show="errorMsg">
                    {{errorMsg}}
                </div>
        </div>
        </div>
        <div class="loader-icon" ng-show="inProgress"></div>
    </form>
</div>
